cmake_minimum_required(VERSION 2.8.12.2)
#
IF($ENV{PLAT} MATCHES "ANDROID")
	ADD_DEFINITIONS(-DANDROID -DLINUX -DLIBMISC)
	set(CMAKE_SYSTEM_NAME Android)
	set(CMAKE_ANDROID_NDK $ENV{CMAKE_ANDROID_NDK})
	set(CMAKE_SYSTEM_VERSION $ENV{CMAKE_SYSTEM_VERSION})
	set(CMAKE_ANDROID_ARCH_ABI $ENV{CMAKE_ANDROID_ARCH_ABI})
	set(CMAKE_ANDROID_STL_TYPE $ENV{CMAKE_ANDROID_STL_TYPE})
ELSE ()
	ADD_DEFINITIONS(-D$ENV{PLAT} -DLIBMISC)
ENDIF()
#
ADD_COMPILE_OPTIONS(-std=c++11 -fPIC -Wall)
ADD_DEFINITIONS(-Wno-builtin-macro-redefined)
SET(CMAKE_CXX_FLAGS $ENV{CXX_FLAGS})
#
FILE(GLOB SRC_MISC "./*/*.cpp")
#
PROJECT(misc-cpp)
#
ADD_LIBRARY(misc-cpp STATIC ${SRC_MISC})
INCLUDE(./__file__.cmake)
REDEFINE_FILE_MACRO(misc-cpp)
